<%@ page import="java.util.ArrayList" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentExamImport.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>考试管理</title>
    <link href="<%=path%>/CSS/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
	<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">



    </script>
    <style type="text/css">


        .tablelist th {
            height: 45px;
        }

        .tablelist td {
            border-right: none;
        }

        tbody tr {
            height: 38px
        }

        .check {
            padding-left: 0px
        }

        a {
            cursor: pointer;
        }

        #student td {
            width: 100%;
            padding-left: 30px;
            text-align: center;
        }

        .head th {
            text-align: center;
        }

        #cent td {
            text-align: center;
            padding-left: 5px;
        }

        table tr td {
            font-size: 12px
        }

        table tr th {
            font-size: 14px
        }
		  .trs td:nth-child(7) {
            border-right: solid 1px #ccc;
        }
        .heads span {
            width: 1573px;
            float: left;
            height: 45px;
            text-align: center;
            line-height: 45px;
            background: #eee;
            font-weight: bold;
            font-size: 14px;
        }

    .seachform li label{line-height: 45px;color: #444444}
.scinput{line-height: 10px;margin-top: 5px}
.scinput1{margin-top: 5px;height: 30px;}
.scbtn{background: #57a0ff;border-radius:20px;width: 110px;margin-top: 4px;height: 35px}
.scbtn2{height: 20px;background: #57a0ff;border-radius:20px;width: 50px;color: #fff;display: none;}

.tablelist th{background: none;border-bottom: none;}
thead {background: #f2f2f2}
tbody tr:nth-child(even) {background: #f7f8fd}
able td{border:1px solid #F00}
.tablelist th{height: 45px;padding-left: 30px}
 .tablelist td{border-right:none;padding-left: 30px}

tbody tr{height: 38px}
.check{padding-left: 0px}
a{cursor: pointer;} 
    .tablelist{width:500px;border:0px;border-collapse:collapse;border-spacing:0;}
 	.tablelist tr{height:30px;}
    .tablelist tr td{border-bottom:1px solid #BBB;} 
    </style>
</head>
<body style="background: #f5f5f5;padding: 0 10px;">
<div id="location_top">
<div class="place" style="background: #f5f5f5;margin-top: 10px">
    <ul class="placeul">
        <li><a href="#">考试管理</a></li>
        <li><a href="<%=path%>/DrivingSys/querySubjectTwoResult/look.action">科目二考试结果登记</a></li>
    </ul>
</div>

<div class="rightinfo" style="background: #fff;border-radius:10px;height: 45px;">

    <form action="<%=path%>/DrivingSys/querySubjectTwoResult/look.action" method="post" onsubmit="selState()">
        <ul class="seachform">
            <ul class="seachform">
                <li><label>单据编号</label><input name="fnumber" type="text" class="scinput" value="${fnumber}"/></li>
                <li><label>参考消息</label><input name="fdescription" type="text" class="scinput" value="${fdescription}"/>
                </li>
                <li><label>学员</label><input name="cfstudentname" type="text" class="scinput" value="${cfstudentname}"/>
                </li>
				<li>
					<label>考核结果</label>
					<select class="scinput" id="cfexmaresult" name="cfexmaresult" style="border: solid 1px #ced9df;width: 100px;height:32px;" >
						<option value="">-&nbsp;-</option>
						<option value="1" <c:if test="${cfexmaresult eq 1}">selected</c:if>>合格</option>
						<option value="2"<c:if test="${cfexmaresult eq 2}">selected</c:if>>不合格</option>
						<option value="3"<c:if test="${cfexmaresult eq 3}">selected</c:if>>缺考</option>
					</select>
				</li>
                <li><label>业务开始时间</label><input class="scinput1" name="beginTime" type="text"
                                                onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'})"
                                                id="datemin" class="input-text Wdate" style="width:100px;"
                                                value="${beginTime}"></li>
                <li><label>业务结束时间</label><input class="scinput1" name="endTime" type="text"
                                                onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',dateFmt:'yyyy-MM-dd'})"
                                                id="datemax" class="input-text Wdate" style="width:110px;"
                                                value="${endTime}"></li>

                <li><label>&nbsp;</label><input name="" type="submit" style="outline: none;" class="scbtn"
                                                value="立即查询"/><input type="hidden" name="selectState" value="-1"/></li>
				<%--<li><label>&nbsp;</label><input name="" type="button" id="importExcel" class="scbtn" value="导出Excel"></li>--%>
            </ul>
        </ul>
    </form>
</div>
</div>
<div id="data_table_new"
	 style="margin-bottom: 0px;margin-top: 30px;background: #fff;border-radius:10px;box-shadow: 0 0 10px #f2f2f2;">
    <ul>
        <li style="height: 40px;text-align: left;color: #999999;">
				  <span style="font-size: 12px;">
 				   <shiro:hasPermission name="/intoAddSubjectTwoResult">
				   <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;"
						src="<%=path%>/images/list/xz.png">
					   &nbsp;<a onclick="gotoSelectCard(this)" funurl="<%=path%>/DrivingSys/intoAddSubjectTwoResult">新增</a>
				   </shiro:hasPermission>
					<shiro:hasPermission name="/deleteSubjectTwoResultByFid">
				  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;"
					   src="<%=path%>/images/list/sc.png">
						&nbsp;<a class="del">删除</a>
					</shiro:hasPermission>
					<shiro:hasPermission name="/intoUpdateSubjectTwoResult">
						<img alt="" height="11px" src="<%=path%>/images/list/xg.png" style="padding-left: 20px">
						<a style="color: #000" class="modify">修改</a>
					</shiro:hasPermission>
				    <shiro:hasPermission name="/studentExamResultUpload">
				 		<img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;"
					  src="<%=path%>/images/list/xz.png">
						&nbsp;<a href="#" id="uploadEventBtn" >导入成绩</a>
					</shiro:hasPermission>

					  <shiro:hasPermission name="/importExcelSubjectTwoResult">
						  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;width: 14px" src="<%=path%>/images/list/excel.png">
						  &nbsp;<a class="importExcel">导出Excle</a>
					  </shiro:hasPermission>
                <a  style="margin-left: 20px;" >字段筛选：</a> <select id="ddlLine" class="easyui-combotree" style="width: 205px; height: 24px;"></select>

				       <label style="padding-left: 22px">&nbsp;</label><input name="" type="submit" class="scbtn2"
																			  value="确定"/>
					<form id="batchUpload"  action="<%=path%>/DrivingSys/upload" method="post" class="form-horizontal" enctype="multipart/form-data" style="display: inline-block">
						<!-- <button class="btn btn-success btn-xs" id="uploadEventBtn" style="height:26px;"  type="button" >选择文件</button> -->
						<input type="file" hidden="hidden" name="file"  style="width:0px;height:0px;" id="uploadEventFile">
						<input type="hidden" id="uploadEventPath"  disabled="disabled"  placeholder="请选择excel表" style="border: 1px solid #e6e6e6; height: 26px;width: 200px;" >
					</form>
				</span>
        </li>   
    </ul>
	<%--<form id="batchUpload"  action="<%=path%>/DrivingSys/upload" method="post" class="form-horizontal" enctype="multipart/form-data" >
    	<!-- <button class="btn btn-success btn-xs" id="uploadEventBtn" style="height:26px;"  type="button" >选择文件</button> -->
    	<input type="file" name="file"  style="width:0px;height:0px;" id="uploadEventFile">  
    	<input type="hidden" id="uploadEventPath"  disabled="disabled"  placeholder="请选择excel表" style="border: 1px solid #e6e6e6; height: 26px;width: 200px;" >                                           
	</form>--%>


	<table class="tablelist" style="white-space:nowrap;">
        <thead>
        <tr class="sq">
            <th><input type="checkbox"  class="check1"  /></th>
			<th id="1">单据编号</th>
			<th id="2">考试日期</th>
			<th id="3">参考信息</th>
			<th id="4">审核人名称</th>
			<th id="5">制单人名称</th>
			<th id="6">单据状态</th>
			<th id="7">学员姓名</th>
			<th id="8">学员编码</th>
			<th id="9">准考证名编号</th>
			<th id="10">身份证号码</th>
			<th id="11">性别</th>
			<th id="12">手机号码</th>
			<th id="13">电话</th>
			<th id="14">vip</th>
			<th id="15">申请车型</th>
			<th id="16">本地/异地</th>
			<th id="17">考试结果</th>
			<th id="18">备注</th>
			<th id="20">班级</th>
			<th id="19">车型</th>
			<th id="21">应收</th>
			<th id="22">已收</th>
			<th id="23">欠费</th>
			<th id="24">优惠</th>
            <th style="text-align:center;">操作</th>
        </tr>
        </thead>
        <c:if test="${empty subjectTwoResultList  }">
        	<tr class="sq">
        		<th colspan="13">
        			<span >抱歉,没有任何相关的记录信息!</span>
        		</th>
        	</tr>
        </c:if>
        <c:forEach items="${subjectTwoResultList}" var="subjectTwoResult" varStatus="fustatus">
        <!-- 1.1 如果子类集合长度小等于5 则就按子类的长度合并 ===开始===  -->
            <c:if test="${fn:length(subjectTwoResult.subjectTwoResultentryList) lt 6 }">
            	<tr class="trs">
                <td rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">
					<c:if test="${subjectTwoResult.cfbillstate eq 4 || subjectTwoResult.cfbillstate eq 5}">
						<input type="checkbox"  class="check"  disabled="disabled" name="nocheck" value="${subjectTwoResult.fid}"/>
					</c:if>
					<c:if test="${subjectTwoResult.cfbillstate eq 3 }">
						<input type="checkbox"  class="check"  name="check" value="${subjectTwoResult.fid}"/>
					</c:if>
					<input type="hidden" name="cfbillstate" value="${subjectTwoResult.cfbillstate}" />
                	<input type="hidden" name="tdlength" value="${fn:length(subjectTwoResult.subjectTwoResultentryList) }"/>
                </td>
                <td class="1" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">${subjectTwoResult.fnumber}</td>
                <td class="2" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">${subjectTwoResult.fbizdate}</td>
                <td class="3" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">${subjectTwoResult.fdescription}</td>
                <td class="4" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">${subjectTwoResult.checkName}</td>
                <td class="5" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">${subjectTwoResult.createName}</td>
                <c:if test="${subjectTwoResult.cfbillstate eq 3}">
                		<td class="6" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">保存</td>
                </c:if>
                 <c:if test="${subjectTwoResult.cfbillstate eq 4}">
                		<td class="6" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">提交</td>
                </c:if>  
                 <c:if test="${subjectTwoResult.cfbillstate eq 5}">
                		<td class="6" rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">审核</td>
                </c:if>
                <c:forEach items="${subjectTwoResult.subjectTwoResultentryList}" var="subjectTwoResultentry" varStatus="status">
                	<c:if test="${status.first}">
                		<td class="7">${subjectTwoResultentry.studentName }</td>
                		<td class="8">${subjectTwoResultentry.cfstufnumber }</td>
                		<td class="9">${subjectTwoResultentry.cfzkzmbh}</td>
                		<td class="10">${subjectTwoResultentry.cfidcardno }</td>
                		<c:if test="${subjectTwoResultentry.cfsex eq 1}">
                			<td class="11">男</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfsex eq 2}">
                			<td class="11">女</td>
                		</c:if>
                		<td class="12">${subjectTwoResultentry.cfmobile }</td>
                		<td class="13">${subjectTwoResultentry.cfphone}</td>
						<c:if test="${ subjectTwoResultentry.cfvip eq 0}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="0"  checked="checked"/></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq 1}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq null}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
                		<td class="15">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<c:if test="${subjectTwoResultentry.cfbdyd eq 1}">
                			<td class="16">本地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 2}">
                			<td class="16">异地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 3}">
                			<td class="16">学生</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 1}">
                			<td class="17">合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 2}">
                			<td class="17">不合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 3}">
                			<td class="17">缺考</td>
                		</c:if>
                		<td class="18">${subjectTwoResultentry.cfremark }</td>
                		<td class="19">${subjectTwoResultentry.cfclazz}</td>

                		<td class="20">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<td class="21">${subjectTwoResultentry.cfreceivable}</td>
                		<td class="22">${subjectTwoResultentry.cfreceived}</td>
                		<td class="23">${subjectTwoResultentry.cfarrearage}</td>
                		<td class="24">${subjectTwoResultentry.cffavorable}</td>
                		<td rowspan="${fn:length(subjectTwoResult.subjectTwoResultentryList) }">
							<shiro:hasPermission name="/intoUpdatesubjectTwoResult">
								<img alt="" height="11px" src="<%=path%>/images/list/xg.png">
								<a href="<%=path%>/DrivingSys/intoUpdatesubjectTwoResult?fid=${subjectTwoResult.fid}"
								   class="tablelink">修改</a>&nbsp;&nbsp;&nbsp;
							</shiro:hasPermission>
							<shiro:hasPermission name="/deleteSubjectTwoResultByFid">
								<img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;"
									 src="<%=path%>/images/list/sc.png">
								&nbsp;<a class="delOne" class="tablelink" style="color: #056dae">删除<input type="hidden" name="fid" value="${subjectTwoResult.fid}">
								<input type="hidden" name="cfbillstate" value="${subjectTwoResult.cfbillstate}" /></a>
								&nbsp;&nbsp;&nbsp;
							</shiro:hasPermission>
						</td>
                	</tr>
                	</c:if>
                	<!--1.1.1 跳过第一行打印 ==开始==  -->	
                	<c:if test="${status.index gt 0  }">
                	<tr >
                		<td style="display: none"><input  type="hidden" class="check" value="${subjectTwoResult.fid}"/></td>
                		<td class="7">${subjectTwoResultentry.studentName }</td>
                		<td class="8">${subjectTwoResultentry.cfstufnumber }</td>
                		<td class="9">${subjectTwoResultentry.cfzkzmbh}</td>
                		<td class="10">${subjectTwoResultentry.cfidcardno }</td>
                		<c:if test="${subjectTwoResultentry.cfsex eq 1}">
                			<td class="11">男</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfsex eq 2}">
                			<td class="11">女</td>
                		</c:if>
                		<td class="12">${subjectTwoResultentry.cfmobile }</td>
                		<td class="13">${subjectTwoResultentry.cfphone}</td>
						<c:if test="${ subjectTwoResultentry.cfvip eq 0}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="0"  checked="checked"/></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq 1}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq null}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
                		<td class="15">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<c:if test="${subjectTwoResultentry.cfbdyd eq 1}">
                			<td class="16">本地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 2}">
                			<td class="16">异地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 3}">
                			<td class="16">学生</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 1}">
                			<td class="17">合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 2}">
                			<td class="17">不合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 3}">
                			<td class="17">缺考</td>
                		</c:if>
                		<td class="18">${subjectTwoResultentry.cfremark }</td>
                		<td class="19">${subjectTwoResultentry.cfclazz}</td>

                		<td class="20">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<td class="21">${subjectTwoResultentry.cfreceivable}</td>
                		<td class="22">${subjectTwoResultentry.cfreceived}</td>
                		<td class="23">${subjectTwoResultentry.cfarrearage}</td>
                		<td class="24">${subjectTwoResultentry.cffavorable}</td>
                	</tr>               	
                	</c:if>
                	<!--1.1.1 跳过第一行打印 ==结束==  -->                	                         		
                </c:forEach>     	
            </c:if>
            <!-- 1.1 如果子类集合长度小等于5 则就按子类的长度合并 ===结束===  -->
   
   			<!-- ------------------------------------------------------------------------------------------------------------- -->
            
            <!--2.1 如果子类集合长度大于5 ===开始===  -->
            <c:if test="${fn:length(subjectTwoResult.subjectTwoResultentryList) gt 5 }">
            	<tr class="trs" id="hebingfuhang${fustatus.index }" >
                <td rowspan="6">
					<c:if test="${subjectTwoResult.cfbillstate eq 4 || subjectTwoResult.cfbillstate eq 5}">
						<input type="checkbox"  class="check"  disabled="disabled" name="nocheck" value="${subjectTwoResult.fid}"/>
					</c:if>
					<c:if test="${subjectTwoResult.cfbillstate eq 3 }">
						<input type="checkbox"  class="check"  name="check" value="${subjectTwoResult.fid}"/>
					</c:if>
					<input type="hidden" name="cfbillstate" value="${subjectTwoResult.cfbillstate}" />
                	<input type="hidden" name="tdlength" value="${fn:length(subjectTwoResult.subjectTwoResultentryList) }"/>
                </td>
                <td class="1" rowspan="6">${subjectTwoResult.fnumber}</td>
                <td class="2" rowspan="6">${subjectTwoResult.fbizdate}</td>
                <td class="3" rowspan="6">${subjectTwoResult.fdescription}</td>
                <td class="4" rowspan="6">${subjectTwoResult.checkName}</td>
                <td class="5" rowspan="6">${subjectTwoResult.createName}</td>
                <c:if test="${subjectTwoResult.cfbillstate eq 3}">
                		<td class="6" rowspan="6">保存</td>
                </c:if>
                 <c:if test="${subjectTwoResult.cfbillstate eq 4}">
                		<td class="6" rowspan="6">提交</td>
                </c:if>  
                 <c:if test="${subjectTwoResult.cfbillstate eq 5}">
                		<td class="6" rowspan="6">审核</td>
                </c:if>                             
                <c:forEach items="${subjectTwoResult.subjectTwoResultentryList}" var="subjectTwoResultentry" varStatus="status">
                	<c:if test="${status.first}">
                		<td class="7">${subjectTwoResultentry.studentName }</td>
                		<td class="8">${subjectTwoResultentry.cfstufnumber }</td>
                		<td class="9">${subjectTwoResultentry.cfzkzmbh}</td>
                		<td class="10">${subjectTwoResultentry.cfidcardno }</td>
                		<c:if test="${subjectTwoResultentry.cfsex eq 1}">
                			<td class="11">男</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfsex eq 2}">
                			<td class="11">女</td>
                		</c:if>
                		<td class="12">${subjectTwoResultentry.cfmobile }</td>
                		<td class="13">${subjectTwoResultentry.cfphone}</td>
						<c:if test="${ subjectTwoResultentry.cfvip eq 0}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="0"  checked="checked"/></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq 1}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq null}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
                		<td class="15">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<c:if test="${subjectTwoResultentry.cfbdyd eq 1}">
                			<td class="16">本地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 2}">
                			<td class="16">异地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 3}">
                			<td class="16">学生</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 1}">
                			<td class="17">合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 2}">
                			<td class="17">不合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 3}">
                			<td class="17">缺考</td>
                		</c:if>
                		<td class="18">${subjectTwoResultentry.cfremark }</td>
                		<td class="19">${subjectTwoResultentry.cfclazz}</td>

                		<td class="20">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<td class="21">${subjectTwoResultentry.cfreceivable}</td>
                		<td class="22">${subjectTwoResultentry.cfreceived}</td>
                		<td class="23">${subjectTwoResultentry.cfarrearage}</td>
                		<td class="24">${subjectTwoResultentry.cffavorable}</td>
                		<td class="hebinghang" rowspan="6">
							<shiro:hasPermission name="/intoUpdatesubjectTwoResult">
								<img alt="" height="11px" src="<%=path%>/images/list/xg.png">
								<a href="<%=path%>/DrivingSys/intoUpdatesubjectTwoResult?fid=${subjectTwoResult.fid}"
								   class="tablelink">修改</a>&nbsp;&nbsp;&nbsp;
							</shiro:hasPermission>
							<shiro:hasPermission name="/deleteSubjectTwoResultByFid">
								<img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;"
									 src="<%=path%>/images/list/sc.png">
								&nbsp;<a class="delOne" class="tablelink" style="color: #056dae">删除<input type="hidden" name="fid" value="${subjectTwoResult.fid}">
								<input type="hidden" name="cfbillstate" value="${subjectTwoResult.cfbillstate}" /></a>
								&nbsp;&nbsp;&nbsp;
							</shiro:hasPermission>
						</td>
                	</tr>
                	</c:if>	
                	<!--2.1.1 跳过第一行打印1至4条的数据 默认显示部分 ==开始== -->
                	<c:if test="${status.index gt 0 and status.index lt 5 }">
                	<tr >
                		<td style="display: none"><input type="hidden" class="check" value="${subjectTwoResult.fid}"/></td>
                		<td class="7">${subjectTwoResultentry.studentName }</td>
                		<td class="8">${subjectTwoResultentry.cfstufnumber }</td>
                		<td class="9">${subjectTwoResultentry.cfzkzmbh}</td>
                		<td class="10">${subjectTwoResultentry.cfidcardno }</td>
                		<c:if test="${subjectTwoResultentry.cfsex eq 1}">
                			<td class="11">男</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfsex eq 2}">
                			<td class="11">女</td>
                		</c:if>
                		<td class="12">${subjectTwoResultentry.cfmobile }</td>
                		<td class="13">${subjectTwoResultentry.cfphone}</td>
						<c:if test="${ subjectTwoResultentry.cfvip eq 0}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="0"  checked="checked"/></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq 1}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
						<c:if test="${ subjectTwoResultentry.cfvip eq null}">
							<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
						</c:if>
                		<td class="15">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<c:if test="${subjectTwoResultentry.cfbdyd eq 1}">
                			<td class="16">本地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 2}">
                			<td class="16">异地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 3}">
                			<td class="16">学生</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 1}">
                			<td class="17">合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 2}">
                			<td class="17">不合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 3}">
                			<td class="17">缺考</td>
                		</c:if>
                		<td class="18">${subjectTwoResultentry.cfremark }</td>
                		<td class="19">${subjectTwoResultentry.cfclazz}</td>

                		<td class="20">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<td class="21">${subjectTwoResultentry.cfreceivable}</td>
                		<td class="22">${subjectTwoResultentry.cfreceived}</td>
                		<td class="23">${subjectTwoResultentry.cfarrearage}</td>
                		<td class="24">${subjectTwoResultentry.cffavorable}</td>
                	</tr>               	
                	</c:if>
                	<!--2.1.1 跳过第一行打印1至4条的数据 默认显示部分 ==结束== -->
                	
                	<!--2.1.2  打印5至子类长度的数据  隐藏部分 ==开始==-->
                	  <c:if test="${status.index gt 4 }">               	  	
                		<tr class="fuhang${fustatus.index }" style="display:none">
                		<td style="display: none"><input  type="hidden" class="check" value="${subjectTwoResult.fid}"/></td>
                		<td  class="7">${subjectTwoResultentry.studentName }</td>
                		<td class="8">${subjectTwoResultentry.cfstufnumber }</td>
                		<td class="9">${subjectTwoResultentry.cfzkzmbh}</td>
                		<td class="10">${subjectTwoResultentry.cfidcardno }</td>
                		<c:if test="${subjectTwoResultentry.cfsex eq 1}">
                			<td class="11">男</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfsex eq 2}">
                			<td class="11">女</td>
                		</c:if>
                		<td class="12">${subjectTwoResultentry.cfmobile }</td>
                		<td class="13">${subjectTwoResultentry.cfphone}</td>
							<c:if test="${ subjectTwoResultentry.cfvip eq 0}">
								<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="0"  checked="checked"/></td>
							</c:if>
							<c:if test="${ subjectTwoResultentry.cfvip eq 1}">
								<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
							</c:if>
							<c:if test="${ subjectTwoResultentry.cfvip eq null}">
								<td class="14"><input type="checkbox"   readonly="readonly" name="" disabled="disabled" value="1"  /></td>
							</c:if>
                		<td class="15">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<c:if test="${subjectTwoResultentry.cfbdyd eq 1}">
                			<td class="16">本地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 2}">
                			<td class="16">异地</td>
                		</c:if><c:if test="${subjectTwoResultentry.cfbdyd eq 3}">
                			<td class="16">学生</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 1}">
                			<td class="17">合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 2}">
                			<td class="17">不合格</td>
                		</c:if>
                		<c:if test="${subjectTwoResultentry.cfexamresult eq 3}">
                			<td class="17">缺考</td>
                		</c:if>
                		<td class="18">${subjectTwoResultentry.cfremark }</td>
                		<td class="19">${subjectTwoResultentry.cfclazz}</td>

                		<td class="20">${subjectTwoResultentry.cfsqzjcxdh }</td>
                		<td class="21">${subjectTwoResultentry.cfreceivable}</td>
                		<td class="22">${subjectTwoResultentry.cfreceived}</td>
                		<td class="23">${subjectTwoResultentry.cfarrearage}</td>
                		<td class="24">${subjectTwoResultentry.cffavorable}</td>
                	</tr>
                	</c:if>
                	<!--2.1.2  打印5至子类长度的数据  隐藏部分 ==结束==  -->   
                	
                	<c:if test="${status.last }">	              	  	               	  	
                	  	<tr id="fuhang${fustatus.index }"  class="sq">
                	  		<td class="7" style="margin:0 auto;"><a  class="showfuhang${fustatus.index }" onclick="showdetails($(this));"><font color="#57a0ff">查看详情</font></a>
                	  			<a  style="display:none; " class="hidefuhang${fustatus.index }" onclick="hidedetails($(this));"><font color="#57a0ff">收起详情</font></a>
                	  		</td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>
                	  		<td></td>                	  
                	  	</tr>
                	  </c:if>
                </c:forEach>                     
            </c:if>
            <!--2.1 如果子类集合长度大于5 ===结束===  -->                
        </c:forEach>
		<%--信息合计总数 --%>
		<tr class="sq">
			<td>合计:</td>
			<td>${messageAmount}</td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td ></td>
		</tr>
    </table>
</div>
	<div id="location_bottom">
  <pg:pager items="${pb.tr}" url="${pb.url}" export="offset,currentPageNumber=pageNumber" maxPageItems="${pb.ps}">  
            <pg:param name="fnumber" value="${fnumber}"/> 
			<pg:param name="fdescription" value="${fdescription}"/>
			<pg:param name="cfstudentname" value="${cfstudentname}"/>
	        <pg:param name="cfexmaresult" value="${cfexmaresult }"/>
			<pg:param name="beginTime" value="${beginTime}"/> 
    		<pg:param name="endTime" value="${endTime}"/>
	        <pg:param name="selectState" value="${selectState}"/>
            <pg:index>  
               <pg:first>
               <a href="${pageUrl}&&type=${type}" >
               <nobr>
               [首页]
               </nobr>
              </a>   
               </pg:first>  
               <pg:prev><a href="${pageUrl}&&type=${type}">前一页</a></pg:prev>  
               <pg:pages>  
                     <c:choose>  
                        <c:when test="${currentPageNumber eq pageNumber}">    
                           <font color="red">${pageNumber }</font>  
                        </c:when>    
                        <c:otherwise>    
                           <a href="${pageUrl}&&type=${type}">${pageNumber}</a>   
                        </c:otherwise>    
                     </c:choose>  
               </pg:pages>  
               <pg:next><a href="${pageUrl}&&type=${type}">下一页</a></pg:next>  
               <pg:last><a href="${pageUrl}&&type=${type}"><nobr>[尾页]</nobr></a></pg:last>  
            </pg:index>      
         </pg:pager>
</div>
<div class="tip">
    <div class="tiptop">
        <span>提示信息</span>
    </div>
    <div class="tipinfo">
        <span><img src="<%=path%>/images/ticon.png"/></span>
        <div class="tipright">
            <p>是否确认对信息删除 ？</p>
            <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
    </div>
    <div class="tipbtn">
        <input name="" type="button" class="sure" value="确定"/>&nbsp; <input
            name="" type="button" class="cancel" value="取消"/>
    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JS/tempJs/tool.js"></script>
<script type="text/javascript">


    var outs=[];
    $(function () {

        // $(".tip").css("left",$(".tablelist").width()-1000)
        <%
        ArrayList<String>  arr=(ArrayList<String>) request.getSession().getAttribute("subjectTowList");
        %>
        outs=<%=arr%>;
        if(outs!=null&&outs!=[]){
            showList(outs)
        }
        $('#ddlLine').combotree({
            valueField: "id", //Value字段
            textField: "text", //Text字段
            multiple: true,
            data: [{ "id": 28, "text": "全选", "children": [{ "id": 1, "text": "单据编码" }, { "id": 2, "text": "考试日期" },
                    { "id": 3, "text": "参考信息"}, { "id": 4, "text": "审核人名称" }, { "id": 5, "text": "制单人名称" }, { "id": 6, "text": "单据状态" }
                    , { "id": 7, "text": "学员姓名" }, { "id": 8, "text": "学员编码" }, { "id": 9, "text": "准考证名编号" }, { "id": 10, "text": "身份证号码" }
                    , { "id": 11, "text": "性别" }, { "id": 12, "text": "手机号码" }, { "id": 13, "text": "电话" }, { "id": 14, "text": "vip" }
                    , { "id": 15, "text": "申请车型" }, { "id": 16, "text": "本地/异地" }, { "id": 17, "text": "考试结果" }
                    , { "id": 18, "text": "备注" }, { "id": 19, "text": "车型" }, { "id": 20, "text": "班级" }
                    , { "id": 21, "text": "应收" }, { "id": 22, "text": "已收" }, { "id": 23, "text": "欠费" }
                    , { "id": 24, "text": "优惠" }
                ]}]
            ,
            //                url: "tree_data2.json", //数据源
            onCheck: function (node, checked) {
                //让全选不显示
                var valueOne = $('#ddlLine').combotree('getValues');
                var valueTow=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24];
                var flag=true;
                var outl=[];
                for(var i=0;i<valueTow.length;i++){
                    flag=true;
                    for(var j=0;j<valueOne.length;j++){
                        if(valueTow[i]==valueOne[j]){ // 如果数据能保证id和name一直配对，则可以少一个比较条件
                            flag = false;
                            break;
                        }
                    }
                    if(flag){
                        $("#"+valueTow[i]).css("display","none")
                        $("."+valueTow[i]).css("display","none")
                    }else{
                        outl.push(valueTow[i])
                        $("#"+valueTow[i]).css("display","")
                        $("."+valueTow[i]).css("display","")
                    }
                }

                $("#outList").val(outl);
                var obj=new Object();
                obj.outList=outl
                $.ajax({
                    url:'<%=path%>/DrivingSys/subjectTowList',
                    data: JSON.stringify(obj),
                    type:"post",
                    dataType:'json',
                    contentType: 'application/json;charset=UTF-8',
                    success: function (res) {
                    }

                })
                console.log(outl)
                $("#ddlLine").combotree("setText", $("#ddlLine").combobox("getText").toString().replace("全选,", ""));
            },
            onClick: function (node, checked) {
                //让全选不显示
                $("#ddlLine").combotree("setText", $("#ddlLine").combobox("getText").toString().replace("全选,", ""));
            }
        });
    })


    //记住筛选的字段
    function showList(outs){
        var valueOne =outs;
        var valueTow=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24];
        var flag=true;
        for(var i=0;i<valueTow.length;i++){
            flag=true;
            for(var j=0;j<valueOne.length;j++){
                if(valueTow[i]==valueOne[j]){ // 如果数据能保证id和name一直配对，则可以少一个比较条件
                    flag = false;
                    break;
                }
            }
            if(flag){
                $("#"+valueTow[i]).css("display","none")
                $("."+valueTow[i]).css("display","none")
            }else{
                $("#"+valueTow[i]).css("display","")
                $("."+valueTow[i]).css("display","")
            }
        }

    }











    $(document).ready(function () {
        var type = "${type}";
        if (type == '0' || type == '' || type == null) {

        } else {
            //alert("添加成功");
            editAlert();
        }
        fixation_List()
    })

//显示
 function showdetails(obj){
	var row=$(obj).parent().parent().prop("id")
	//隐藏点击查看更多
	$(".show"+row).hide()
	//显示点击收起详情
	$(".hide"+row).show()
	//显示数据详情
	$("."+row).show()
	var hebingshu=$("#hebing"+row+" input:hidden[name=tdlength]").val()
	hebingshu=Number(hebingshu)	
	hebingshu+=1	
	//alert(hebingshu)
	$("#hebing"+row).find("td").eq(0).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td").eq(1).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td").eq(2).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td").eq(3).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td").eq(4).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td").eq(5).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td").eq(6).attr("Rowspan",hebingshu)
	$("#hebing"+row).find("td:last").attr("Rowspan",hebingshu)
}


//隐藏
function hidedetails(obj){
	 var row=obj.parent().parent().prop("id")
	 //显示点击查看更多
	 $(".show"+row).show()
	 //隐藏点击收起详情
	 $(".hide"+row).hide()
	 //隐藏大于5条的数据
	 $("."+row).hide()
	 //合并行改成只显示之前的5条加一条点击查看更多tr
	 $("#hebing"+row).find("td").eq(0).attr("Rowspan",6)
	 $("#hebing"+row).find("td").eq(1).attr("Rowspan",6)
	 $("#hebing"+row).find("td").eq(2).attr("Rowspan",6)
	 $("#hebing"+row).find("td").eq(3).attr("Rowspan",6)
	 $("#hebing"+row).find("td").eq(4).attr("Rowspan",6)
	 $("#hebing"+row).find("td").eq(5).attr("Rowspan",6)
	 $("#hebing"+row).find("td").eq(6).attr("Rowspan",6)
	 $("#hebing"+row).find("td:last").attr("Rowspan",6)
	
}


   $(document).ready(function () {
        //删除多个
        $('.del').click(function () {
            /* $('.check').toggle() */
            /* $('.scbtn2').toggle() */
             var fidids = document.getElementsByName("check");
            var carid;
            for (var i = 0; i < fidids.length; i++) {
                if (fidids[i].checked) {
                    carid = fidids[i].value;
                }
            }
            if (carid == null || carid == "") {
                alert("请至少选择一条数据删除")
                return false
            } else {
                //判断单据状态
                var count=0;
                $("input:checkbox[name=check]:checked").each(function(i){
                    if($(this).next().val() == 4 || $(this).next().val() == 5){
                        count++;
                    }
                })
                if(count>0){
                    alert("提交和审核结束的单据不能删除!");
                    return false;
                }else{
                    $(".tip").fadeIn(200);
                }
            }
            $(".sure").click(function () {
                $(".tip").fadeOut(100);
                // $('.check').toggle()
                //$('.scbtn2').toggle()
                /* location='deleteCarByFid?deleteId='+deleteId+''; */
                var str = new Array();
                var fids = document.getElementsByName("check");
                for (var i = 0; i < fids.length; i++) {
                    if (fids[i].checked) {
                        str[i] = fids[i].value;
                    }
                }
                location = '<%=path%>/DrivingSys/deleteSubjectTwoResultByFid?deleteId=' + str + '';
            })

            $(".cancel").click(function () {
                $(".tip").fadeOut(100);
            });
        }) 
      //删除单个
        $('.delOne').click(function () {
            var fid = $(this).find("input:hidden[name=fid]").val();
            var cfbillstate =$(this).find("input:hidden[name=cfbillstate]").val();
            if(cfbillstate == 4 || cfbillstate ==5){
                alert("提交和审核状态的单据不能删除!")
                return false;
            }
            $(".tip").animate(({top: $(window).scrollTop()+250}))
            $('.window-mask').fadeToggle()
            $(".tip").fadeIn(200);
            $(".sure").click(function () {
                location = '<%=path%>/DrivingSys/deleteSubjectTwoResultByFid?fid=' + fid + '';
            })

            $(".cancel").click(function () {
                $(".tip").fadeOut(100);
            });
        })

        //修改
        $(".modify").click(function () {
            var stringFid;
            var fids = document.getElementsByName("check");
            var	schools
            for (var i = 0; i < fids.length; i++) {
                if (fids[i].checked) {
                    stringFid = fids[i].value;
                    location = '<%=path%>/DrivingSys/intoUpdateSubjectTwoResult?fid=' + stringFid + '';
                    return false
                }
            }
            if (stringFid == null || stringFid.length == 0) {
                alert("请至少选择一条数据修改")
                return false
            }
        })
     
        //查询详情
        $("tr:not(.sq)").dblclick(function () {
            var modify = $(".modify").text();
            if(modify == '' || modify == null){

            }else{
                var fid2 = $(this).find(".check").val();
                //alert(fid2)
                //避免fid中有+，或者特殊字符
                var fid = encodeURI(fid2).replace(/\+/g, '%2B')
                gotoSelectCard(this,'/DrivingSys/intoUpdateSubjectTwoResult?fid='+fid);

                //location = '<%=path%>/DrivingSys/intoUpdateSubjectTwoResult?fid=' + fid + '';
			}

        })
        //全选全不选
		$(".check1").click(function(){
			if(this.checked){
			    $("[name=check]").attr("checked",true);}
			else{ $("[name=check]").attr("checked",false);}
		})
    }) 
  
 $("#haha").click(function(){
     $('#modal-overlay').css('visibility', 'visible')
     $('.modal-data11').css('visibility', 'visible')
 })

  var User = function(){  
    
    this.init = function(){  
          
        //上传excel  
         $("#uploadEventBtn").unbind("click").bind("click",function(){  
             $("#uploadEventFile").click();  
         });  
         $("#uploadEventFile").bind("change",function(){  
             $("#uploadEventPath").attr("value",$("#uploadEventFile").val());  
             var uploadEventFile = $("#uploadEventFile").val();
             var uploadEventFile = $("#uploadEventFile").val();
             var pos=uploadEventFile.lastIndexOf("\\");
             $.messager.confirm('提示', '是否把'+uploadEventFile.substring(pos+1)+'导入到科目二考试结果!', function (r) {
                 if(r) {//弹出确认对话框
                     if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel
                         alert("只能上传Excel文件");
                         return false;
                     }else{
                         var url =  '<%=path%>/DrivingSys/studentExamResultUpload';
                         var formData = new FormData($('form')[1]);
                         //alert(formData)
                         user.sendAjaxRequest(url,'POST',formData);
                     }
                     var file = document.getElementById('uploadEventFile');
                     file.value = ''; //虽然file的value不能设为有字符的值，但是可以设置为空值
                     return true;    //点击确定时，返回值为true，执行如上操作。
                 }else{
                     var file = document.getElementById('uploadEventFile');
                     file.value = ''; //虽然file的value不能设为有字符的值，但是可以设置为空值
                     return false; //点击取消时，返回值为false，不执行操作。
                 }
			 })

            
         });  
          
    };  
    <%-- //点击上传按钮  
    this.uploadBtn = function(){  
        var uploadEventFile = $("#uploadEventFile").val();  
        if(uploadEventFile == ''){  
            alert("请选择excel,再上传");  
        }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel  
            alert("只能上传Excel文件");  
        }else{  
            var url =  '<%=path%>/DrivingSys/upload';  
            var formData = new FormData($('form')[0]);
            //alert(formData)
            user.sendAjaxRequest(url,'POST',formData);  
        }  
    };   --%>
      
    this.sendAjaxRequest = function(url,type,data){  
        $.ajax({  
            url : url,  
            type : type,  
            data : data,  
            success : function(result) { 
            	if(result == null){
            		alert("没有可以导入的数据！")
            	} else if(result == -1){
                    alert("导入的Excel格式不正确!")
                }else{
                    $('#modal-overlay').css('visibility', 'visible')
                    $('.modal-data11').css('visibility', 'visible')
					var sumData="";
					var data="";
                    var tablength = 0;
                    sumData ="总共: "+(result["success"].length+result["failed"].length)+"条,其中成功的: "+result["success"].length+"条,<font color=\"red\">失败:"+result["failed"].length+"条.</font>";
                    $(".resultCount").append(sumData);
                    /*if(result["success"].length >result["failed"].length){
                        tablength = result["success"].length;
					}else{
                        tablength = result["failed"].length;
					}
                    for(var i= 0;i<tablength;i++){
                        if(i>= result["success"].length){
							data+="<tr><td></td>";
						}else{
                            data+="<tr><td>"+result["success"][i]["name"]+"</td>";
						}
						if(i>= result["success"].length){
                            data +="<td>"+result["failed"][i]["name"]+"</td><td>"+result["failed"][i]["mes"]+"</td></tr>";
						}else{
                            data +="<td></td><td></td></tr>";
						}
					}*/
                    if(result["success"].length >result["failed"].length){//循环行数为成功和失败的最多的条数
                        tablength = result["success"].length;
                        //成功多
                        for(var i=0;i<tablength;i++){
                            data+="<tr><td>"+result["success"][i]["name"]+"</td>";
                            if(i< result["failed"].length){
                                data +="<td>"+result["failed"][i]["name"]+"</td><td>"+result["failed"][i]["mes"]+"</td></tr>";
                            }else{
                                data +="<td></td><td></td></tr>";
                            }
                        }
                    }else{
                        tablength = result["failed"].length;
                        //失败多
                        for(var i=0;i<tablength;i++){
                            if(i < result["success"].length){
                                data+="<tr><td>"+result["success"][i]["name"]+"</td>";
                            }else{
                                data+="<tr><td></td>";
                            }
                            data+="<td>"+result["failed"][i]["name"]+"</td><td>"+result["failed"][i]["mes"]+"</td></tr>";
                        }
                    }
					$(".tablelist11").append(data);
            	}
            	
            },  
            error : function() {  
                alert( "excel上传失败");  
            },  
            cache : false,  
            contentType : false,  
            processData : false  
        });  
    };  
}

    <%--//设置select的默认值--%>
    <%--$(function () {--%>
        <%--var result="${cfexmaresult}";--%>
        <%--$("select[name='cfexmaresult']").find("option[value='0']").removeAttr("selected");--%>

        <%--$("select[name='cfexmaresult']").find("option[value='"+result+"']").attr("selected",true);--%>

    <%--})--%>

  
var user;  
$(function(){  
    user = new User();  
    user.init();  
});
$('.btn').click(function () {
    location='<%=path%>/DrivingSys/querySubjectTwoResult/look.action';
})

    //用于业务日期全部输入给空时查询全部内容 做一个标记给后台
    function  selState() {
        var beginTime =$("input:text[name=beginTime]").val();
        var endTime =$("input:text[name=endTime]").val();
        if(beginTime == "" || endTime == ""){
            $("input:hidden[name=selectState]").val("1");
        }
    }
    //导出
    $(".importExcel").click(function () {
        var fnumber = $("input[name='fnumber']").val();//编号
        var fdescription = $("input[name='fdescription']").val();//参考信息
        var studentName = $("input[name='cfstudentname']").val();//学员
        var cfexmaresult = $("#cfexmaresult").val();//考试结果
        var beginTime = $("input[name='beginTime']").val();//业务开始时间
        var endTime = $("input[name='endTime']").val();//业务结束时间
        fnumber = $.trim(fnumber);
        fdescription = $.trim(fdescription);
        studentName =$.trim(studentName);
        location = '<%=path%>/DrivingSys/importSubjectTwoResult?fnumber=' + fnumber+
			'&fdescription='+fdescription+'&studentName='+studentName+
			'&beginTime='+beginTime+'&endTime='+endTime+'&cfexmaresult='+cfexmaresult;
    })
</script>
</html>
